﻿using HTB.DevFx.Utils;

namespace Maple.Weixin.MP.Entities.Menus
{
    public abstract class MenuBase
    {
        protected MenuBase(string name) {
            this.Name = name;
        }

        public string Name { get; private set; }

        public string ToJson() {
            var entity = ToJsonObject();
            return JsonHelper.ToJson(entity, false);
        }

        protected internal abstract object ToJsonObject();
    }

    public abstract class SingleMenu : MenuBase
    {
        protected SingleMenu(string name) : base(name) {}
    }
}
